using Mono.Cecil.Cil;

namespace Cil.Ast;

public sealed class PushNullExpression : SingleInstructionExpression
{
	public PushNullExpression(Context context, Instruction position)
		: base(context, position)
	{
		// base class
		ReturnType = Context.MakeRef<object>();
		WritesStack = 1;
		Nodes = new FixedList<Expression>();
	}

	public override string ToString()
	{
		return string.Format("null");
	}
}

public static partial class IlAst
{
	public static PushNullExpression PushNull(Context context, Instruction position)
	{
		return new PushNullExpression(context, position);
	}
}